<template>
  <div class="title-bar bb1 df">
    <span class="title df1">宇宙超级无敌大美女写的爱普🎃</span>
    <div class="btn">
      <i class="iconfont icon-minus" @click="close"></i>
      <i class="iconfont icon-plus" @click="close"></i>
    </div>
  </div>
</template>

<style scoped lang="scss" rel="stylesheet/scss">
  .title-bar {
    padding: 8px 10px;
    -webkit-app-region: drag;
    background-color: #f6f6f6;
    .title {
      font-size: 13px;
    }
    .btn {
      -webkit-app-region: no-drag;
      i {
        cursor: pointer;
        &:hover {
          color: $primary;
        }
        &:first-child {
          margin-right: 25px;
        }
      }
      .icon-plus {
        display: inline-block;
        transform: rotate(45deg);
      }
    }
  }
</style>

<script type="text/babel">
  import { remote } from 'electron'

  const { BrowserWindow } = remote

  export default {
    components: {},
    data() {
      return {}
    },
    watch: {},
    computed: {},
    methods: {
      miniSize () {
        const window = BrowserWindow.getFocusedWindow()
        window.minimize()
      },
      close () {
        const window = BrowserWindow.getFocusedWindow()
        window.hide()
      }
    },
    mounted() {
    },
  }
</script>

